import { Http } from '@/common/api'

// 供应商列表
export const listSupplierUrl = '/upms/user/page'

// 获取组织机构
export const apiDeptTree = async (params) => Http.post('/upms/dept/tree', params)

// 组织机构下用户列表
export const listOrgUserUrl = '/upms/user/pageUserByOrg'

// 证书弹窗
// 证书人员查询
export const supplierStaffUrl = '/srm/supplier/staff/cert/page'
export const apiStaffCertPage = async (params) => Http.post('/srm/supplier/staff/cert/page', params)
// 新增
export const apiStaffCertAdd = async (params) => Http.post('/srm/supplier/staff/cert/add', params)
// 更新
export const apiStaffCertUpdate = async (params) => Http.put('/srm/supplier/staff/cert/update', params)
// 查询
export const apiStaffCertFindById = async (id) => Http.get(`/srm/supplier/staff/cert/findById/${id}`)
// 删除
export const apiStaffCertDelete = async (id) => Http.delete(`/srm/supplier/staff/cert/delete?id=${id}`)

// 特种人员--查询
export const supplierStaffSpecialUrl = '/srm/supplier/staff/special/page'

export const apiStaffSpecialPage = async (params) => Http.post('/srm/supplier/staff/special/page', params)
// 新增
export const apiStaffSpecialAdd = async (params) => Http.post('/srm/supplier/staff/special/add', params)
// 更新
export const apiStaffSpecialUpdate = async (params) => Http.put('/srm/supplier/staff/special/update', params)
// 查询
export const apiStaffSpecialFindById = async (id) => Http.get(`/srm/supplier/staff/special/findById/${id}`)
// 删除
export const apiStafSpecialfDelete = async (id) => Http.delete(`/srm/supplier/staff/special/delete?id=${id}`)

// 人员职称
export const supplierStaffTitleUrl = '/srm/supplier/staff/title/page'

export const apiStaffTitlePage = async (params) => Http.post('/srm/supplier/staff/title/page', params)
// 新增
export const apiStaffTitleAdd = async (params) => Http.post('/srm/supplier/staff/title/add', params)
// 更新
export const apiStaffTitleUpdate = async (params) => Http.put('/srm/supplier/staff/title/update', params)
// 查询
export const apiStaffTitleFindById = async (id) => Http.get(`/srm/supplier/staff/title/findById/${id}`)
// 删除
export const apiStaffTitleDelete = async (id) => Http.delete(`/srm/supplier/staff/title/delete?id=${id}`)
